A technique has been proposed that backs up data while supply of power to a storage apparatus is stopped (see, for example, Japanese Laid-open Patent Publication No. 2003-256295).
In addition, some of redundant arrays of inexpensive (independent) disks (RAID) apparatuses have the capability of performing power failure processing or power recovery processing to protect data integrity at the time of a power failure. The power failure processing backs up cache data stored in a cache memory to a flash memory upon occurrence of a power failure. The power recovery processing restores the data backed up in the flash memory to the cache memory.
The power failure processing and power recovery processing will be briefly described below. Upon power failing, the controller of a RAID apparatus backs up cache data stored in a cache memory to a flash memory (power failure processing) using power charged in a capacitor (super capacitor). Upon power being recovered, the controller of the RAID apparatus restores the data backed up in the flash memory to the cache memory (power recovery processing). In addition, the controller erases the data of all the data blocks of the flash memory (erasure processing) during the power recovery processing while sufficient power is available.
Upon a power failure occurring during the power recovery processing, power failure processing is performed subsequent to the completion of erasure processing. However, it is difficult to perform power failure processing using only the power charged in the capacitor subsequent to the completion of the erasure processing. This may result in loss of the cache data. Hence, referring to FIG. 8, for example, a technique has been proposed providing a RAID apparatus having a redundant configuration with two distributed controllers (CPUs), one controller performs power recovery processing after the other controller has completed power recovery processing.
However, the technique of coping with a power failure during power recovery processing by providing a RAID apparatus with two controllers cannot be used for a RAID apparatus with a single controller, and hence loss of cache data cannot be prevented.
Furthermore, even if the controller of a RAID apparatus has a redundant configuration, power charged in a capacitor (super capacitor) may not be sufficient for performing power recovery processing subsequent to erasure processing. Accordingly, cache data may be lost.